#!/bin/bash

WORK_PATH='/root/webTeam/manage/'
cd $WORK_PATH
git reset --hard origin/master
git clean -f
git pull origin master
docker build -t manage-images .
docker stop manage-container
docker rm manage-container
docker run -itd -p 9001:9001 -p 9003:9003 --name manage-container -v /root/webTeam/manage/log:/app/log -v /root/webTeam/manage/public:/app/public -v /root/webTeam/image/avatar:/app/api/avatar -v /root/webTeam/image/articles:/app/api/articles  manage-images
docker system prune
